package com.nt.thah.dao;

import com.nt.thah.entity.UserAccount;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description: 用户余额
 * @author: ls
 * @Date: 2020-08-11 09:28:02
 */
@Mapper
public interface UserAccountDao {

    Integer updateUserAccount(UserAccount userAccount);

    List<UserAccount> getUserCommissionList();

    UserAccount getUserCommissionInfo(Integer userId);

    List<UserAccount> batchGetUserCommission(List<Integer> userIdList);

    Integer checkIsExist(Integer userId);

    int saveUserAccount(UserAccount userAccount);

    int recoverAccount(@Param("userId") Integer userId, @Param("amount") Long amount);
}
